Along with the recent advance of robot technologies, robots have taken the place of humans in doing complicated tasks (for example, assembling industrial products). Such a robot grips a component by an end effector such as a hand to assemble a product. For this assembly, it is necessary to measure the relative position/orientation between the component to be gripped and the robot (hand).
A method of measuring the position/orientation by performing model fitting for features detected from a two-dimensional image captured by an image capturing apparatus is known. Another known method converts various points of a distance image obtained by a distance sensor into three-dimensional point cloud data and performing model fitting for the three-dimensional point cloud.
In the model fitting for a two-dimensional image, a three-dimensional shape model is projected onto the two-dimensional image based on the position/orientation of an object, and the projected image is fitted to features detected from the two-dimensional image, thereby measuring the position/orientation of the object.
In the model fitting for a distance image, various points of the distance image expressing distance data are converted into three-dimensional point cloud data, and it is fitted to a three-dimensional shape model, thereby measuring the position/orientation of an object. Also known is a method of measuring the position/orientation of an object using both measurement information obtained from a two-dimensional image and that obtained from a distance image.
The arrangement that measures the position/orientation of an object using both measurement information obtained from a two-dimensional image and that obtained from a distance image is generally expected to improve the measurement accuracy.
However, the measurement can sometimes be done more accurately by using only one of the measurement information obtained from the two-dimensional image and that obtained from the distance image depending on the measurement situation (for example, the shape of the object or the manner the object is placed).
A sufficient measurement accuracy may be ensured only by performing measurement using one of the measurement information obtained from the two-dimensional image and that obtained from the distance image according to circumstances. In this case, it is unnecessary to perform the measurement using both methods. Considering the calculation time or calculation resource, the processing may be wasteful instead.